1. Field of the Invention
The invention relates to digital image processing, and more particularly to demosaicking a digital image captured by an image sensor overlaid with a color filter array.
2. Description of the Related Art
Most digital cameras or image sensors use a color filter array, such as the well-known Bayer color filter array, to capture a digital image in order to reduce costs. In this way, each pixel in the captured image records a value of only one color. This kind of image is called a mosaicked image. FIG. 1 illustrates a structure of a Bayer pattern, wherein G is green, R is red, and B is blue. To reconstruct a full color image, a mosaicked image is demosaicked to obtain values of two missing colors for each pixel of the mosaicked image.
Some demosaicking processes can be roughly divided into two steps. The first step is to decide the interpolating direction of each pixel. The second step is to interpolate the values of two missing colors for each pixel along the decided interpolating direction. For example, some demosaicking processes use bilinear interpolation to estimate information of two missing colors for each pixel. In bilinear interpolation, the values of the two missing colors are calculated based on an average of the values of the neighboring pixels, in a vertical, horizontal and/or diagonal direction. However, artifacts, such as zipper effect or false color, might occur in the demosaicked image when the values of the two missing colors for each pixel are not interpolated along a proper interpolating direction, reducing image quality. The zipper effect makes a straight edge in the image looks like a zipper. Effects on a part of the artifacts can be diminished by preventing interpolation across the edge.